Dynamic Problem (algorithms)
   HOME

TheInfoList



OR:

Dynamic problems in
computational complexity theory In theoretical computer science and mathematics, computational complexity theory focuses on classifying computational problems according to their resource usage, and relating these classes to each other. A computational problem is a task solved ...
are problems stated in terms of the changing input data. In the most general form a problem in this category is usually stated as follows: * Given a class of input objects, find efficient algorithms and data structures to answer a certain query about a set of input objects each time the input data is modified, i.e., objects are inserted or deleted. Problems of this class have the following measures of complexity: * Space the amount of memory space required to store the data structure; * Initialization time time required for the initial construction of the data structure; * Insertion time time required for the update of the data structure when one more input element is added; * Deletion time time required for the update of the data structure when an input element is deleted; * Query time time required to answer a query; * Other operations specific to the problem in question The overall set of computations for a dynamic problem is called a dynamic algorithm. Many algorithmic problems stated in terms of fixed input data (called static problems in this context and solved by static algorithms) have meaningful dynamic versions.


Special cases

Incremental algorithms, or
online algorithm In computer science, an online algorithm is one that can process its input piece-by-piece in a serial fashion, i.e., in the order that the input is fed to the algorithm, without having the entire input available from the start. In contrast, an o ...
s, are algorithms in which only additions of elements are allowed, possibly starting from the empty/trivial input data. Decremental algorithms are algorithms in which only deletions of elements are allowed, starting with an initialization of a full data structure. If both additions and deletions are allowed, the algorithm is sometimes called fully dynamic.


Examples


Maximal element

;''Static problem'' : For a set of N numbers find the maximal one. The problem may be solved in O(N) time. ;''Dynamic problem'' : For an initial set of N numbers, dynamically maintain the maximal one when insertion and deletions are allowed. A well-known solution for this problem is using a
self-balancing binary search tree In computer science, a self-balancing binary search tree (BST) is any node-based binary search tree that automatically keeps its height (maximal number of levels below the root) small in the face of arbitrary item insertions and deletions.Donal ...
. It takes space O(N), may be initially constructed in time O(N log N) and provides insertion, deletion and query times in O(log N). ;''The priority queue maintenance problem'': It is a simplified version of this dynamic problem, where one requires to delete only the maximal element. This version may do with simpler data structures.


Graphs

Given a graph, maintain its parameters, such as connectivity, maximal degree, shortest paths etc., when insertion and deletion of its edges are allowed. D. Eppstein,
Z. Galil Zvi Galil ( he, צבי גליל; born June 26, 1947) is an Israeli-American computer scientist and mathematician. Galil served as the President of Tel Aviv University from 2007 through 2009. From 2010 to 2019, he was the dean of the Georgia Instit ...
, and G. F. Italiano. "Dynamic graph algorithms". In ''CRC Handbook of Algorithms and Theory of Computation'', Chapter 22. CRC Press, 1997.


See also

*
Dynamization In computer science, dynamization is the process of transforming a static data structure into a dynamic one. Although static data structures may provide very good functionality and fast queries, their utility is limited because of their inability t ...
*
Dynamic connectivity In computing and graph theory, a dynamic connectivity structure is a data structure that dynamically maintains information about the connected components of a graph. The set ''V'' of vertices of the graph is fixed, but the set ''E'' of edges can ch ...
*
Kinetic data structure A kinetic data structure is a data structure used to track an attribute of a geometric system that is moving continuously. For example, a kinetic convex hull data structure maintains the convex hull of a group of n moving points. The developme ...


References

{{Reflist Computational complexity theory Computer science stubs